package com.songshuai.sales.tool.service.impl;

import com.songshuai.sales.tool.service.LabelRelationService;
import com.songshuai.webapi.baseapi.model.sales.LabelRelation;
import com.songshuai.sales.tool.dao.tool.LabelRelationMapper;

import org.springframework.stereotype.Service;
import org.springframework.beans.factory.annotation.Autowired;

import java.util.List;


/**
 * 此类为[基础代码]自动生成,已经拥有基本的增删改成操作 
 * <其他请自行扩展>
 * @Author: 刘汉轩
 * @Date: 2019-03-20 15:48:10
 * 
 */
@Service
public class LabelRelationServiceImpl implements LabelRelationService{
 
      
    @Autowired
	private LabelRelationMapper labelRelationMapper;
	
	
	/**
     * 新增
     * @param entity 
     */
    public int insertSelective (LabelRelation entity) { 
        return this.labelRelationMapper.insertSelective(entity);
    }	
    
    /**
     * 批量新增
     * @param list 
     */
    public void insertBatch(List<LabelRelation> list) {       
        this.labelRelationMapper.insertBatch(list); 
    }
    
    /**
     * 根据主键修改单条数据
     * @param entity 
     */
    public int updateByPrimaryKey(LabelRelation entity) {
        return this.labelRelationMapper.updateByPrimaryKey(entity);
    }
    
    /**
     * 根据主键批量修改数据
     * @param list 
     */
    public void updateBatch(List<LabelRelation> list) {      
        this.labelRelationMapper.updateBatch(list);     
    }
    
    /**
     * 根据主键查询单条数据
     * @param id
     */
    public LabelRelation selectByPrimaryKey(Integer id) {
        return this.labelRelationMapper.selectByPrimaryKey(id);
    }
    
    /**
     * 根据条件查询单条记录
     * @param entity 
     */
    public LabelRelation selectByEntity(LabelRelation entity) {
        return this.labelRelationMapper.selectByEntity(entity);
    }
      
    /**
     * 根据条件查询多条记录
     * @param entity 
     */
    public List<LabelRelation> selectByEntityList(LabelRelation entity) {
        return this.labelRelationMapper.selectByEntityList(entity);
    }
    
    /**
     * 根据条件查询Id
     * @param entity 
     */
    public Integer selectById(LabelRelation entity) {
        return this.labelRelationMapper.selectById(entity);
    }
    
    /**
     * 根据条件查询Ids
     * @param entity 
     */
    public List<Integer> selectByIds(LabelRelation entity) {
        return this.labelRelationMapper.selectByIds(entity);
    }
    
    /**
     * 根据主键删除单条记录
     * @param id
     */
    public void deleteByPrimaryKey(Integer id) {
        this.labelRelationMapper.deleteByPrimaryKey(id);
    }
    
    /**
     * 根据主键删除多条记录
     * @param list
     */
    public void deleteBatch(List<Integer> list) {
        this.labelRelationMapper.deleteBatch(list);
    }
    
    /**
     * 根据某些条件删除
     * @param entity
     */
    public void deleteByEntity(LabelRelation entity) {
        this.labelRelationMapper.deleteByEntity(entity);
    }
    
   
}